home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 15723 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.4 KB

  1. Path: ix.netcom.com!news
  2. From: philma@ix.netcom.com(Phil Majtan)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: code overflow annoyance
  5. Date: 20 Apr 1996 22:32:54 GMT
  6. Organization: Netcom
  7. Message-ID: <4lbomm$npm@dfw-ixnews2.ix.netcom.com>
  8. References: <sugar-1604961528300001@129.64.9.9>
  9. NNTP-Posting-Host: det-mi4-10.ix.netcom.com
  10. X-NETCOM-Date: Sat Apr 20  5:32:54 PM CDT 1996
  11.  
  12. In <sugar-1604961528300001@129.64.9.9> sugar@binah.cc.brandeis.edu
  13. (Phil Sugar) writes: 
  14. >
  15. >Hi, I apologize in advance if this is posted in an inappropriate
  16. newsgroup.
  17. >
  18. >I'm using Think C 5.0 and I need to declare many arrays for a program
  19. I'm
  20. >writing, but the stupid dope won't let me declare more than about 60K
  21. >worth of variables.  I have over 1800K of free Ram, and I've tried
  22. >changing Think C's memory partition but I still always get the "Code
  23. >Overflow" compilation error if I try to declare an array larger than
  24. 60K. 
  25. >How can I solve this?  Thanks very much for any advice you can give
  26. me!
  27.  
  28. You might be limited to a single segment for your variables.  You
  29. probably have to use a 'LARGE' memory model to compile.  I don't know
  30. anything about Think c, so I don't know what it uses, but I'm sure it
  31. has some way to set the memory model.
  32. The problem is probably from the fact that you are limited to 64K code
  33. and 64K data.  The arrays are usually allocated from a 'heap' bewteen
  34. the stack and the end of the code.  Once this is used up, you're outta
  35. luck.
  36. Phil
  37.  
  38.